<script setup lang="ts" name="App">
const themeVars = reactive<ThemeVars>({})
</script>

<template>
  <van-config-provider class="root" :theme-vars="themeVars">
    <RouterView v-slot="{ Component, route }">
      <KeepAlive>
        <Component
          v-if="route.meta?.keepAlive"
          :is="Component"
          :key="route.path"
        ></Component>
      </KeepAlive>

      <Component
        v-if="!route.meta?.keepAlive"
        :is="Component"
        :key="route.path"
      ></Component>
    </RouterView>
  </van-config-provider>
</template>

<style scoped lang="scss"></style>
